package com.xiyuan.smartutils.template.engine.expression.symbol;

import com.xiyuan.smartutils.template.engine.expression.operator._Method;
import com.xiyuan.smartutils.template.engine.expression.primitive._Decimal;

/**
 * 点号原型(.)<br>
 * <br>
 * 
 * @see _Decimal 浮点型，Integer._Integer<br>
 * @see _Method 方法访问，_Name._Name_BracketLeft<br>
 * 
 * @version v1.0.0 @author lgz 2020年11月1日 新建与整理
 */
public class _Dot extends Symbol
{
    private static final long serialVersionUID = 1L;
    public _Dot(String path, int line, int column)
    {
        super(path, line, column);
    }
    
    private int type = SYMBOL_DOT;
    public _Dot setDouble(boolean isDouble)
    {
        this.type = isDouble ? SYMBOL_DOT_2 : SYMBOL_DOT;
        return this;
    }
    
    @Override
    public int getType()
    {
        return type;
    }
    
    @Override
    public String toString()
    {
        return type == SYMBOL_DOT ? "." : "..";
    }
}
